package com.itheima.sh.feign.fallback;

import com.itheima.sh.feign.UserFeignApi;
import com.itheima.sh.pojo.User;
import org.springframework.stereotype.Component;

/**
 * @author YYP
 * @date 2020/12/20
 */
@Component
public class UserFeignFallBackApi implements UserFeignApi {
    //feign对Hystrix支持的降级方法
    @Override
    public User queryById(String username) {
        User user = new User();
        user.setName(username);
        user.setName("暂停服务-UserFeignApiFallBack");

        return user;
    }
}
